<extend name="Layout:layout_dialog" />
<block name="body_main">
    <form action="{:U('link_edit_save')}" method="post" class="xsui-form" enctype="multipart/form-data">
        <fieldset>
            <div class="xsui-form-field">
                <label>标题：</label>
                <input type="text" name="title" placeholder="标题" value="{$data.title}" required="required" size="30" />
            </div>
            <div class="xsui-form-field">
                <label>链接地址：</label>
                <input type="text" name="link_url" placeholder="链接地址" value="{$data.link_url}" required="required" size="75" />
            </div>
            <div class="xsui-form-field">
                <label>图片地址：</label>
                <sohtml:file name="image_url" value="{$data.image_url}" />
            </div>
            <div class="xsui-form-field">
                <label>备注：</label>
                <input type="text" name="remark" placeholder="备注" value="{$data.remark}" size="80" />
            </div>
            <div class="xsui-form-field xsui-form-mgb">
                <label>状态：</label>
                <sohtml:radio name="status" items="1:显示;0:隐藏" value="{$data.status|default=0}" required="required" />
            </div>
        </fieldset>
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>保存</button>
        <button type="reset" class="ui-state-default">重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
        <input type="hidden" name="site_id" value="{$data.site_id}"/>
        <input type="hidden" name="user_name" value="{$data.user_name}"/>
    </form>
</block>
<block name="body_after">
    <script>
        $(function () {
            FormPage.ui_init();
        })
    </script>
</block>